﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Web;

/// <summary>
/// Class1 的摘要描述
/// </summary>

[System.ComponentModel.DataObjectAttribute(true)]
public partial class BLL_ManageUser
{
    public BLL_ManageUser()
    {
        //
        // TODO: 在此加入建構函式的程式碼
        //
    }

    //SELECT 單位ID
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select)]
    public DataTable BLL_SelectMyOrganization(int MyOrganizationID)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.SelectMyOrganization(MyOrganizationID);
    }

    //SELECT 鄉鎮ID
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select)]
    public DataTable BLL_SelectMyRegion(int MyOrganizationID)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.SelectMyRegion(MyOrganizationID);
    }


    //SELECT
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select)]
    public DataTable BLL_Select(string EmployeeID, string EmployeeName, string OrganizationID, int MyOrganizationID)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.ManageUser_Select(EmployeeID, EmployeeName, OrganizationID, MyOrganizationID);
    }

    //Insert
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Insert)]
    public int BLL_Insert(string EmployeeID, string EmployeeName,string Password, string OrganizationID,string Active)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.ManageUser_Insert(EmployeeID, EmployeeName, Password, OrganizationID, Active);
    }

    //Update
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Update)]
    public int BLL_Update(string EmployeeID, string EmployeeName, string Password, string OrganizationID, string Active)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.ManageUser_Update(EmployeeID, EmployeeName, Password, OrganizationID, Active);
    }

    //Delete
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Delete)]
    public int BLL_Delete(string original_EmployeeID)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.ManageUser_Delete(original_EmployeeID);
    }

}
